﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace nwrole.toolbox.sync.entity
{
    public class SyncEntityDemoRepository
    {


        public List<SyncEntity> GetSyncEntityList()
        {
            List<SyncEntity> list = new List<SyncEntity>();

            list.Add(new SyncEntity()
            {
                Id = 1,
                Name = "ar",
                SourceTableName = "ar",
                SyncDat = DateTime.Now,
                SortIndex = 1
            });

            list.Add(new SyncEntity()
            {
                Id = 2,
                Name = "orp",
                SourceTableName = "orp",
                SyncDat = DateTime.Now,
                SortIndex = 2
            });

            list.Add(new SyncEntity()
            {
                Id = 3,
                Name = "fr",
                SourceTableName = "fr",
                SyncDat = DateTime.Now,
                SortIndex = 3
            });

            return list;
        }


        public SyncEntity GetSyncEntity()
        {
            SyncEntity e = new SyncEntity()
            {
                Id = 1,
                Name = "ar",
                SourceTableName = "ar",
                SyncDat = DateTime.Now,
                SortIndex = 1
            };

            List<SyncEntityColumn> list = new List<SyncEntityColumn>();
            list.Add(new SyncEntityColumn()
            {
                Id = 1,
                ColumnName = "test1",
                SourceSqlTypeName = "varchar",
                SourceSqlTypeNullableBool = false,
                SyncEnabled = 0
            });

            list.Add(new SyncEntityColumn()
            {
                Id = 2,
                ColumnName = "test2",
                SourceSqlTypeName = "varchar",
                SourceSqlTypeNullableBool = false,
                SyncEnabled = 0
            });

            list.Add(new SyncEntityColumn()
            {
                Id = 3,
                ColumnName = "test3",
                SourceSqlTypeName = "varchar",
                SourceSqlTypeNullableBool = false,
                SyncEnabled = 0
            });

            e.Columns = list;

            return e;
        }
    }
}
